﻿
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
@using Beauty.Model
@using Beauty.BLL

<head>
    <meta name="viewport" content="width=device-width" />

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>@ViewBag.Title</title>
    <link href="~/css/model.pack.css" rel="stylesheet" />
    <link href="~/css/style.pack.css" rel="stylesheet" />
    <link href="~/css/style.css" rel="stylesheet" />
    <script src="~/js/libs.pack.js"></script>
    <script src="~/js/we.base.pack.js"></script>
    <script src="~/static/layui.js"></script>
    @RenderSection("head", false);

</head>

<body>
    @*<asp:ContentPlaceHolder ID="blurWrap" runat="server">
            <%--<div class="blurWrap">--%>
        </asp:ContentPlaceHolder>*@
    @RenderSection("blurWrap", false);


    <!--顶部导航开始-->
    <div class="nav navBottomBorderColor1">
        <div class="navContainer">
            <a href="/" title="咕嘟咕嘟 - 首页">
                <img src="~/images/logoblack.png" class="logo" alt="咕嘟咕嘟logo">
                @*<span style="float :left;margin-top: 10px;font-size: 30px;font-family: 微软雅黑;color: white;">咕嘟咕嘟</span>*@
            </a>
            <ul class="left">
                @if (ViewData["classes"] != null)
                {
                    foreach (var item in (List<picclass>)ViewData["classes"])
                    {
                        <li>
                            <a href="/Albums/@item.PinYin">@item.ClassName</a>
                        </li>
                    }
                }


            </ul>
            <p class="navSlideLineWrap">
                <span style="left: -83px;"></span>
            </p>
            <div id="login_head">

                @{
                    Beauty.Model.user users = Session[DataConfig.UserSessionName] as user;
                    if (users != null)
                    {

                        @RenderPage("~/Views/Shared/_LoginPart.cshtml", new { param = users })
                    }
                    else
                    {

                        HttpCookie cookies = Request.Cookies[DataConfig.AutoLoginCookie];
                        if (cookies == null)
                        {
                            <ul class="left" style="float:right">
                                <li>
                                    <a href="~/User/Login/" target="_self" style="float:right">登录</a>
                                </li>
                                <li>
                                    <a href="~/User/Register/" target="_self" style="float:right">注册</a>
                                </li>


                            </ul>
                        }
                        else
                        {
                            string uname = cookies.Values["name"];
                            string upass = cookies.Values["pass"];
                            userBLL bllUser = new userBLL();
                            List<user> user2 = bllUser.GetModelList("UName='" + uname + "'");
                            if ((uname == user2[0].UName && upass == user2[0].UPass))
                            {
                                Session[DataConfig.UserSessionName] = user2[0];
                                @RenderPage("~/Views/Shared/_LoginPart.cshtml", new { param = user2[0] })
                            }
                        }






                    }

                }


            </div>

        </div>
    </div>
    <!--顶部导航结束&正文-->
    @*<asp:ContentPlaceHolder ID="body_header" runat="server">
        </asp:ContentPlaceHolder>*@
    @RenderBody()


    <div class="kefuBtn" title="咨询客服">
        <a href="http://wpa.qq.com/msgrd?v=3&amp;uin=1184919092&amp;site=qq&amp;menu=yes" target="_blank"></a>
    </div>
    <div class="sideFloatBtnWrap" style="display: block;">
        <a href="javascript:void(0);" class="backToTop" title="返回顶部">
            <i></i>
        </a>
    </div>

    <div class="footer">
        <p>Copyright©2015武汉耐腾科技有限责任公司 - 鄂ICP备14009070号 - 1</p>
        <script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://"); document.write(unescape("%3Cspan id='cnzz_stat_icon_1260657553'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s11.cnzz.com/z_stat.php%3Fid%3D1260657553%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));</script>
    </div>

    </div>

    <script src="~/js/we.common.pack.js"></script>
    <script src="~/js/we.template.pack.js"></script>
    <script src="~/js/we.shop.pack.js"></script>

</body>
</html>
<script>
    @*$.get("@Url.RouteUrl("Defaul1t", new { controller = "Common", action = "LoginHead" })", function (result) {

        $("#login_head").html(result);
    })*@
    layui.use(['layer'], function () {
        var layer = layui.layer;


    });
    $("#dt-account").mouseover(function () {
        $(".dt-menu").addClass("show")
    })
    $("#dt-account").mouseleave(function () {
        $(".dt-menu").removeClass("show")
    })

    $("#logout").click(function () {
        var loading = layer.load(3, { shade: 0.5})
        $.post("/UserCenter/Logout", function (result) {
            if (result == "ok") {
                layer.close(loading)
                location.reload();
            } else {
                layer.alert("退出失败");
            }


        })
    })
</script>
